home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / PGM_TOOL / SMP_PT / HICOLOR.PAS < prev    next >
Pascal/Delphi Source File  |  1995-04-02  |  1KB  |  44 lines

  1. {Comments:
  2.  
  3.           The only thing high color codes change are the blink attributes.
  4.           If you make the textbackground(0) and the textcolor(15+blink),
  5.           you will get a grayish background, and white text..  Without
  6.           the +blink or +128, it will look the same as low color.
  7.  
  8. }
  9.  
  10. uses crt, dos;
  11.  
  12. procedure highcolor;
  13. var regs: registers;
  14. begin
  15.     FillChar (regs, SizeOf(regs), 0); (* An initialization precaution *)
  16.     regs.ah := $10;                   (* Function $10 *)
  17.     regs.al := $03;                   (* Subfunction $03 *)
  18.     regs.bl := $00;                   (* turns on high color *)
  19.     Intr ($10, regs);      (* ROM BIOS video driver interrupt *)
  20. end;
  21.  
  22.  
  23. procedure lowcolor;
  24. var regs: registers;
  25. begin
  26.     FillChar (regs, SizeOf(regs), 0); (* An initialization precaution *)
  27.     regs.ah := $10;                   (* Function $10 *)
  28.     regs.al := $03;                   (* Subfunction $03 *)
  29.     regs.bl := $01;                   (* turns off high color *)
  30.     Intr ($10, regs);      (* ROM BIOS video driver interrupt *)
  31. end;
  32.  
  33. begin
  34.    highcolor;
  35.    clrscr;
  36.    textbackground(0);
  37.    textcolor(15+blink);
  38.    clrscr;
  39.    writeln('This really works....');
  40.    readkey;
  41.    lowcolor;   {use to change back to low color, duh}
  42.    normvideo; {reset to normal video mode}
  43.    clrscr;
  44. end.